using UnityEngine;
using System.Collections;

public class AnimationHq : MonoBehaviour {

	public string[] texts;
	public Vector3[] camPositions;
	public TextMesh textHome;
	public string SceneLoad;
	int count;
	
	void Start()
	{
		
		count = PlayerPrefs.GetInt("Count");
		transform.position = camPositions[count];
		textHome.text = texts[count];
	}
	
	void Update () 
	{
		if(Input.GetKeyDown("space"))
		{
			checkText();
			if(count < 8)
			count ++;
			textHome.text = texts[count];
			transform.position = camPositions[count];
			Debug.Log(count);
		}
		
	}
	
	void checkText()
	{
		if(count == texts.Length-1)
		{
			Application.LoadLevel(SceneLoad);
		}
		if(count == 4)
		{
			Application.LoadLevel("CutScene");
		}
	}
}
